<!--<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>-->
<head>
  <?php
PageUtil::addVar("javascript_body","<script type=\"text/javascript\" src=\"".$themepath."/framework/ckeditor/ckeditor.js\"></script>");
?>
<style>
div.img
{
  margin: 5px;
  padding: 5px;
  border: 1px solid #0000ff;
  height: auto;
  width: auto;
  float: left;
  text-align: center;
} 
div.img img
{
  display: inline;
  margin: 5px;
  border: 1px solid #ffffff;
}
div.img a:hover img {border: 1px solid #0000ff;}
div.desc
{
  text-align: center;
  font-weight: normal;
  width: 150px;
  margin: 5px;
}
.ta3 {
  width:150px;
  height:60px;
  border:2px dashed #D1C7AC;
}
    #autoSuggestionsList > li {
         background: none repeat scroll 0 0 #F3F3F3;
         border-bottom: 1px solid #E3E3E3;
         list-style: none outside none;
         padding: 3px 15px 3px 15px;
         text-align: left;
    }
    #autoSuggestionsList > li a { color: #800000; }
    .auto_list {
         border: 1px solid #E3E3E3;
         border-radius: 5px 5px 5px 5px;
         position: absolute;
    }
</style>
</head>
<body>
 <?php foreach($resList as $key=>$val){
}?>
<section class="cat-widget wdg-cat-opposite clearfix">
  <div class="widget-title">
      <h3><a href="#"><?php echo $val["name"]; ?></a></h3>
      <div class="sep-widget"></div>
  </div>
  <section class="col-md-12">
  <form method="post" action="<?php echo base_url('restaurant/user_review_upload');?>" enctype="multipart/form-data">
      <div class="row">
      <div class="form-group">
        <div class="col-sm-3"></div>
        <!--<div class="col-sm-4">
          <img alt="Image Display Here" id="test" src="<?php echo $imagepath;?>/user.png" width="200px" height="200px"/>
          <input onchange="readURL(this);" type="file" />
        </div>-->
        </div>
      <?php if(!empty($val["id"])){
        ?>
        <input type="hidden" class="form-control" name="id" value="<?php echo $val["id"];?>">
        <input type="hidden" name="name"  value="<?php echo $val["name"];?>"/>
      <?php }?>
      </div>
      <div class="row">
      <div class="form-group">
        <label class="col-sm-3 control-label" for="username">ความประทับใจ</label>
        <div class="col-sm-7">
          <input type="text" class="col-sm-5 form-control required" name="impression" id="username" />
        </div>
      </div>
      </div><br/>
      <div class="row">
      <div class="form-group">
        <label class="col-sm-2 control-label" for="address">รายละเอียด</label>
        <div class="col-sm-9">
          <textarea id="editor1" class="ckeditor" name="content"></textarea>
        </div>
      </div>
      </div><br/><hr/>
              <!--<div class="row">
      <div class="form-group">
        <label class="col-sm-2 control-label">ประเภทรอง</label>
        <div class="col-sm-3">
       <?php foreach( $traList as $key=>$value) { ?>
            <label class="checkbox-inline">
            <input type="checkbox" name="tag[]" value="<?php echo $value['id']; ?>" id="gender[m]"><?php echo $value['name']; ?></label><br />
            <?php } ?>
        </div>
        </div>
      </div><br/>-->
      <div class="hidden">
        <?php 

          $dateTime = new DateTime('now', new DateTimeZone('Asia/Bangkok'));

        ?>
        <input type="text" class="col-sm-6 form-control required" name="comment_status" id="comment_status" value="1">
        <input type="text" class="col-sm-6 form-control required" name="update_date" id="update_date" value="<?php echo $dateTime->format('Y-m-d H:i:s');?>">
        <input type="text" class="col-sm-6 form-control required" name="view" id="view" value="1">
        <input type="text" class="col-sm-6 form-control required" name="cr_date" id="cr_date" value="<?php echo $dateTime->format('Y-m-d H:i:s');?>">
        <input type="text" class="col-sm-6 form-control required" name="lu_date" id="lu_date" value="<?php echo $dateTime->format('Y-m-d H:i:s');?>">
        <input type="text" class="col-sm-6 form-control required" name="lu-uid" id="lu-uid" value="1">
        <input type="text" class="col-sm-6 form-control required" name="comment_count" id="comment_count" value="1">
      </div>
  <div class="row">
  <div class="col-sm-2"></div>
    <div class="col-sm-4">
      <div class="img">
        <a href="#">
          <img alt="Image Display Here" id="test1" src="<?php echo $imagepath;?>/t01.png" width="150px" height="150px"/>
        </a>
        <div class="desc"><textarea class="ta3" name="taxt1" placeholder="เพิ่มรายละเอียดรูปภาพที่นี..."></textarea></div>
      </div>
    </div>
    <div class="col-sm-4">
      <div class="img">
        <a href="#" >
          <img alt="Image Display Here" id="test2" src="<?php echo $imagepath;?>/t01.png" width="150px" height="150px"/>
        </a>
        <div class="desc"><textarea class="ta3" name="taxt2" placeholder="เพิ่มรายละเอียดรูปภาพที่นี่..."></textarea></div>
      </div>
    </div>
    <div class="col-sm-2"></div>
    </div>
    <div class="row">
    <div class="col-sm-2"></div>
    <div class="col-sm-4">
      <input  onchange="readURL1(this);" type="file" name="image1"  />
    </div>
    <div class="col-sm-4">
      <input  onchange="readURL2(this);" type="file" name="image2"  />
    </div>
    <div class="col-sm-2"></div>
    </div>
    <div class="row">
    <div class="col-sm-2"></div>
    <div class="col-sm-4">
      <div class="img">
        <a href="#">
          <img alt="Image Display Here" id="test3" src="<?php echo $imagepath;?>/t01.png" width="150px" height="150px"/>
        </a>
        <div class="desc"><textarea class="ta3" name="taxt3" placeholder="เพิ่มรายละเอียดรูปภาพที่นี่..."></textarea></div>
      </div>
    </div>
    <div class="col-sm-4">
      <div class="img">
        <a href="#">
          <img alt="Image Display Here" id="test4" src="<?php echo $imagepath;?>/t01.png" width="150px" height="150px"/>
        </a>
        <div class="desc"><textarea class="ta3" name="taxt4" placeholder="เพิ่มรายละเอียดรูปภาพที่นี่..."></textarea></div>
      </div>
    </div>
    <div class="col-sm-2"></div>
  </div>
  <div class="row">
    <div class="col-sm-2"></div>
   <div class="col-sm-4">
      <input  onchange="readURL3(this);" type="file" name="image3"  />
    </div>
    <div class="col-sm-4">
      <input  onchange="readURL4(this);" type="file" name="image4"  />
    </div>
    <div class="col-sm-2"></div>
    </div><hr/>
  <div class="form-group">
        <div class="col-sm-offset-5">
          <button type="submit" class="btn btn-primary" id="submitbtn" name="upload" value="upload">ยืนยัน</button>
          <a href="<?php echo base_url("admin/restaurant/");?>" class="btn btn-default">ยกเลิก</a>
        </div>
      </div>
  </form>
</section>
</section>
</body>
 